<!DOCTYPE html>
<html lang="en">

<head>
	<{include file="header.html" }>
		<title>视频库-
			<{$user_data[ 'school_name']}>-德安信会计在线教育平台</title>
		<link href="/static/public/webupload/webuploader.css" rel="stylesheet">
</head>

<body>
	<div class="wrap">
		<!--star left-->
		<div class="column">
			<{include file="left_menu.html" }>
		</div>
		<div id="ContMianBox">
			<!--star子栏目-->
			<div class="sub-colum">
                <div class="tit"><{$left_menu_min.menu}></div>
                <ul>
                    <{foreach from=$left_menu_min.list item=item}>
                    <li <{if $item['url'] == $left_menu_min.curr}>class="curr"<{/if}>><a href="<{$item['url']}>"><{$item['name']}></a></li>
                    <{/foreach}>
                </ul>
            </div>
			<!--end子栏目-->
			<!--end left-->
			<div class="container narrow">
				<!--star conter-->
				<div class="cetContent">
					<div class="tit p-lr20">
						<span><a href="/course">视频课</a></span>
                        <span class="curr"><a href="/course/video">视频库</a></span>
                        <span><a href="/course/cate_subject_list">视频课科目</a></span>
                        <span><a href="/course/cate_list">视频课分类</a></span>
					</div>
				</div>
				<!--star内容区域-->
				<div class="mainScroll">
					<div class="mainContainer line-all">
						<!--star tabMainCont-->
						<div class="tabMainCont">
							<div class="tabItem m-t20">
								<div class="layui-field-box">
										<form class="layui-form layui-form-pane1" method="post" action="<{$current_url}>">
                                        <{assign var="pid" value=$conditions['pid']|default:"all"}>
                                        
                                            <div class="layui-input-inline">
                                                <select name="category[cate_id]" class="abc" lay-verify="required" id="cate_id" placeholder="请选择" lay-filter="cate_id">
                                                    <option value="">课程分类</option>
                                                    <{foreach from=$cate item=item}>
                                                        <option value="<{$item.id}>" <{if $data['cate_id']|default:"" eq $item.id}>selected="selected"<{/if}>><{$item.name}></option>
                                                    <{/foreach}>
                                                </select>
                                            </div>
                                            <div class="layui-inline">
                                                <select name="category[kemu]" lay-verify="required" id="subject" placeholder="请选择" lay-filter="subject">
                                                    <option value="">请选择科目</option>
                                                     <{foreach from=$subject item=item}>
                                                        <option value="<{$item.id}>" <{if $data['subject_id']|default:"" eq $item.id}>selected="selected"<{/if}>><{$item.name}></option>
                                                    <{/foreach}>
                                                </select>
                                            </div>

                                            <div class="layui-inline">
                                                <input type="text" name="category[search]" placeholder="搜索内容" value="<{if $data['search']}><{$data['search']}><{/if}>" class="layui-input">
                                            </div>

                                            <div class="layui-inline">
                                                <button type="submit" class="layui-btn">搜索</button>
                                                <a class="layui-btn" href="/course/add_video"><i class="layui-icon"></i> 上传视频</a>
                                            </div>
                                        </div>
                                    </form>
								</div>
							</div>
							<!--商品列表 star-->
							<div class="goods_list p-t10">
								<div class="mtc_tab">
									<!--star mc-->
									<div class="mc">

										<div class="u_table_list">
											<!--star 商品-->
											<div class="table002">
												<table>
													<colgroup>
														<col width="5%">
														<col width="%">
														<col width="%">
														<col width="%">
														<col width="%">
														<col width="%">
														<col width="%">
													</colgroup>
													<tbody>
														<tr>
															<th>编号</th>
															<th>图片</th>
															<th>文件名</th>
															<th>时长</th>
															<th>大小</th>
															<th>上架时间</th>
															<th>操作</th>
														</tr>
													</tbody>
													<tbody>
														<{foreach from=$video item=item}>
															<tr>
																<td class="not_lb tal">
																	<{$item[ 'id']}></td>
																<td class="not_lb tal">
																	<div class="">
																		<div class="t_img">
																			<img src="<{$item['image_url']}>" height="70" width="100" />
																		</div>
																		
																	</div>
																</td>
																<td>
																<div class="">
																			<a class="fs16" href="javascript:;">
																				<{$item[ 'title']}>
																			</a>
																		</div>
																</td>
																<td class="not_lb tal">
																	<{$item[ 'duration']}>
																</td>
																<td class="not_lb tal">
																	<{$item[ 'video_size']}>
																</td>
																<td class="not_lb tal">
																	<{$item[ 'add_time']|date_format: '%Y-%m-%d <br> %H:%M:%S'}></td>
																<td class="not_lb tal">
																	<div class="colorBtn">
																		<p><a href="/course/edit_video/<{$item['id']}>">编辑</a></p>
																		<p><a href="javascript:void(0);">删除</a></p>
																	</div>
																</td>
															</tr>
															<{/foreach}>
													</tbody>
												</table>
											</div>
											<!--end 商品-->
										</div>
										<div class="pages p-tb20" style="text-align:right;">
											<div class="l">
												<!-- <a href="javascript:;" class="zent-btn">提交</a>
                                    <a href="javascript:;" class="zent-btn">未知按钮</a>
                                    <a href="javascript:;" class="zent-btn">未知按钮</a>
                                    <a href="javascript:;" class="zent-btn">未知按钮</a> -->
											</div>
											<div class="pages p-tb20" style="text-align:right;">
												<{$pagination}>
											</div>

											</form>
										</div>
									</div>
									<!--end mc-->
								</div>

							</div>
							<!--商品列表 end -->
						</div>
						<!--end tabMainCont-->
					</div>

				</div>
			</div>
			<!--end内容区域-->

<{include file="footer.html"}>
<script>
    $(function() {
        layui.use(['form','layedit','jquery'], function() {
            var form = layui.form();
            var layedit = layui.layedit;
            $ = layui.jquery;
            form.on('select(cate_id)', function(data){
                var ii = layer.load();
                var id = data.value;
                $("#course_id").html('<option value="">请选择科目</option>');
                form.render('select');
                $.ajax({
                    type: "POST",
                    url: "/course/get_cate_subject",
                    data: {id:id},
                    dataType: "json",
                    success: function (data) {
                        var ddl = $("#subject");
                        var html ='<option value="">请选择科目</option>';
                        $(data).each(function (key) {
                            html += "<option value='"+data[key].id+"'>"+data[key].name+"</option>";
                        });
                        $("#subject").html(html);
                        form.render('select');
                        layer.close(ii);
                    }
                });
            });  
        });


    })
    
</script>
